package com.coolt.client.ui;

import com.coolt.client.logic.ListarComunidade ;
import com.coolt.client.ui.AppConstants;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
import com.google.gwt.user.client.ui.HasVerticalAlignment;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Hyperlink;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.VerticalPanel;

public class Comunidades extends Composite {
	private static VerticalPanel verticalPanel;
	private static final AppConstants CONSTANTS = (AppConstants) GWT.create(AppConstants.class);
	public Comunidades() {

		 verticalPanel = new VerticalPanel();
		initWidget(verticalPanel);
		verticalPanel.setWidth("209");

		final HorizontalPanel horizontalPanel = new HorizontalPanel();
		verticalPanel.add(horizontalPanel);
		horizontalPanel.setSize("209", "26");
		horizontalPanel.setStyleName(CONSTANTS.horizontalPanel_styleName_2());

		final Hyperlink comunidadesHyperlink = new Hyperlink("Comunidades", "some history token");
		comunidadesHyperlink.setStyleName("linkssecoes");
		horizontalPanel.add(comunidadesHyperlink);
		horizontalPanel.setCellVerticalAlignment(comunidadesHyperlink, HasVerticalAlignment.ALIGN_MIDDLE);

		final Hyperlink verTodosHyperlink = new Hyperlink("Ver Todos", "some history token");
		verTodosHyperlink.setStyleName("linkssecoes");
		horizontalPanel.add(verTodosHyperlink);
		horizontalPanel.setCellVerticalAlignment(verTodosHyperlink, HasVerticalAlignment.ALIGN_MIDDLE);
		horizontalPanel.setCellHorizontalAlignment(verTodosHyperlink, HasHorizontalAlignment.ALIGN_RIGHT);
		
		ListarComunidade  comunidadeList=new ListarComunidade();
		verticalPanel.add(comunidadeList.getComunidades());
	}
	public static VerticalPanel getVerticalPanel() {
		return verticalPanel;
	}
}
